class Paddle extends Spirit {
  constructor() {
    super('img/paddle.png')
    this.speed = 5
    this.x = 250
    this.y = 350
  }
  moveLeft() {
    if (this.x < 0) {
      return
    }
    this.x -= this.speed
  }
  moveRight() {
    // 600是画布的宽
    if (this.x + this.w > 600) {
      return
    }
    this.x += this.speed
  }
}